package IC;

/**
 * Enum of the IC language's binary operators.
 * 
 * @author Tovi Almozlino
 */
public enum BinaryOps {

	PLUS("+", "addition",true),
	MINUS("-", "subtraction",true),
	MULTIPLY("*", "multiplication",true),
	DIVIDE("/", "division",true),
	MOD("%", "modulo",true),
	LAND("&&", "logical and",false),
	LOR("||", "logical or",false),
	LT("<", "less than",false),
	LTE("<=", "less than or equal to",false),
	GT(">", "greater than",false),
	GTE(">=", "greater than or equal to",false),
	EQUAL("==", "equality",false),
	NEQUAL("!=", "inequality",false);
	
	private String operator;
	
	private String description;
	
	private Boolean isMath ;

	private BinaryOps(String operator, String description, Boolean isM) {
		this.operator = operator;
		this.description = description;
		this.isMath = isM;
	}

	/**
	 * Returns a string representation of the operator.
	 * 
	 * @return The string representation.
	 */
	public String getOperatorString() {
		return operator;
	}
	
	/**
	 * Returns a description of the operator.
	 * 
	 * @return The description.
	 */
	public String getDescription() {
		return description;
	}
	
	/**
	 * 
	 * @return true for Math operator and false for Logical operator
	 */
	public Boolean isMathOperator() {
		return isMath;
	}
	
}